package com.sanqi.work.service.impl;

import java.util.List;
import com.sanqi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.sanqi.work.mapper.WorkStepLevelMapper;
import com.sanqi.work.domain.WorkStepLevel;
import com.sanqi.work.service.IWorkStepLevelService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
 * 工作计件阶梯Service业务层处理
 * 
 * @author duany
 * @date 2025-10-08
 */
@Service
public class WorkStepLevelServiceImpl extends ServiceImpl<WorkStepLevelMapper, WorkStepLevel> implements IWorkStepLevelService 
{
    @Autowired
    private WorkStepLevelMapper workStepLevelMapper;

    /**
     * 查询工作计件阶梯
     * 
     * @param id 工作计件阶梯主键
     * @return 工作计件阶梯
     */
    @Override
    public WorkStepLevel selectWorkStepLevelById(String id)
    {
        return workStepLevelMapper.selectWorkStepLevelById(id);
    }

    /**
     * 查询工作计件阶梯列表
     * 
     * @param workStepLevel 工作计件阶梯
     * @return 工作计件阶梯
     */
    @Override
    public List<WorkStepLevel> selectWorkStepLevelList(WorkStepLevel workStepLevel)
    {
        return workStepLevelMapper.selectWorkStepLevelList(workStepLevel);
    }

    /**
     * 新增工作计件阶梯
     * 
     * @param workStepLevel 工作计件阶梯
     * @return 结果
     */
    @Override
    public int insertWorkStepLevel(WorkStepLevel workStepLevel)
    {
        return save(workStepLevel) ? 1 : 0;
    }

    /**
     * 修改工作计件阶梯
     * 
     * @param workStepLevel 工作计件阶梯
     * @return 结果
     */
    @Override
    public int updateWorkStepLevel(WorkStepLevel workStepLevel)
    {
        return updateById(workStepLevel) ? 1 : 0;
    }

    /**
     * 批量删除工作计件阶梯
     * 
     * @param ids 需要删除的工作计件阶梯主键
     * @return 结果
     */
    @Override
    public int deleteWorkStepLevelByIds(String[] ids)
    {
        return workStepLevelMapper.deleteWorkStepLevelByIds(ids);
    }

    /**
     * 删除工作计件阶梯信息
     * 
     * @param id 工作计件阶梯主键
     * @return 结果
     */
    @Override
    public int deleteWorkStepLevelById(String id)
    {
        return workStepLevelMapper.deleteWorkStepLevelById(id);
    }
}
